import { useEffect } from "react";
// 打印页面生命周期的自定义hooks
function useLogLife(compName) {
  useEffect(() => {
    console.log(compName+'组件被创建');

    return () => {
      console.log(compName+'组件被销毁');
    }
  },[])
}

export default useLogLife